//
//  EnableBusLineCell.m
//  didacar
//
//  Created by 度周末网络-王腾 on 15/12/3.
//  Copyright © 2015年 dzmmac. All rights reserved.
//

#import "EnableBusLineCell.h"
#import "RegularBusLineModel.h"
#import "UILabel+Yyx.h"
@implementation EnableBusLineCell

- (void)awakeFromNib {
    self.status.layer.cornerRadius = 2;
    self.status.layer.masksToBounds=YES;
}

-(void)showModel:(RegularBusLineModel *)regularBusLinewModel{
    
    if (regularBusLinewModel == nil) {
        return;
    }
    self.startTime.text = regularBusLinewModel.SendTime;
    
    [BaseTableViewCell setBusLineStartLocationString:regularBusLinewModel.StartStation startStationType:regularBusLinewModel.StartStationType label:self.startLocation];
 
    
    self.endLocation.text = regularBusLinewModel.EndStation;
    
    self.price.attributedText = [self getPrice:regularBusLinewModel.TicketPrice.stringValue leftText:@"约 " leftSymbol:@"¥"];
    
    self.kilometerTime.text = [NSString stringWithFormat:@"%@人报名",@(regularBusLinewModel.SignUpNum)];
    
    // 报名样式
    if (regularBusLinewModel.isSignUp == 0) {
        [self.status statusWaitRegistration];
    }else{
        [self.status statusRegistration];
    }
}

@end
